﻿using JinfuyuanProject.Entity;
using JinfuyuanProject.Repository;
using JinfuyuanProject.Repository.Interface;
using JinfuyuanProject.Service.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JinfuyuanProject.Service
{
    public class ExpenseRecordService:IExpenseRecordService
    {
        private readonly IExpenseRecordRepository _expenseRecordRepository;

        public ExpenseRecordService(IExpenseRecordRepository expenseRecordRepository)
        {
            _expenseRecordRepository= expenseRecordRepository;
        }
        public bool Delete(ExpenseRecord expenseRecord)
        {
            return _expenseRecordRepository.Delete(expenseRecord);
        }

        public IQueryable<ExpenseRecord> GetList()
        {
            return _expenseRecordRepository.GetList();
        }

        public ExpenseRecord GetModel(int Id)
        {
            return _expenseRecordRepository.GetModel(Id);
        }

        public int Insert(ExpenseRecord expenseRecord)
        {
            return _expenseRecordRepository.Insert(expenseRecord);
        }

        public bool Update(ExpenseRecord expenseRecord)
        {
            return _expenseRecordRepository.Update(expenseRecord);
        }
    }
}
